package model.evaluatetest;

import model.evaluate.entity.Evaluate;
import model.evaluate.service.IEvaluateService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import org.springframework.test.context.junit4.SpringRunner;


import java.util.Date;
import java.util.List;

@RunWith(SpringRunner.class)
@SpringBootTest
public class testEvaluate {
    @Autowired
    private IEvaluateService evaluateService ;
    @Test
   public void testfindAll(){

       List<Evaluate> evaluates = evaluateService.findAll();
       evaluates.forEach(System.out::println);
   }

   @Test
    public void testSave(){
        Evaluate evaluate = new Evaluate();
        evaluate.setEvaluateId("5");
        evaluate.setEvaluateUsername("yy");
        evaluate.setEvaluateDetail("kk");
        evaluate.setEvaluateTime(new Date());
        evaluate.setEvaluateImgs("oo");
        evaluateService.save(evaluate);
   }

   @Test
    public void testDel(){
        evaluateService.del("yy");

   }

}
